home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 14
/
014.d81
/
alarm control
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
459b
|
13 lines
10 poke 56579,15:rem sets pb0-pb3 to output, pb4-pb7 to inputs
15 poke56578,peek(56578)or 4 :rem pa2 is made an ouput
20 for b=0 to 15
30 poke56577,b:rem generates binary count on pb0-pb3
40 a=peek(56577)and 16:rem senses state of input selected by count
45 if a=16 and b=15 then 90: rem jump to delay if alarm was triggered by sw 15
50 if a=16 then poke 56576,peek(56576)and251:rem alarm has been triggered
55 if a=16 then end
60 next b
70 goto 20
90 for c=1 to 50000:next c: rem delay for normal entrance
100 goto50